package xmlKlient;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;

public class XMLKlient {

	 public static void main(String[] args) throws IOException {

	    	PrintWriter out = null;
			BufferedReader in = null;
			try {
				Socket kkSocket = new Socket("localhost", 64567);
				out = new PrintWriter(kkSocket.getOutputStream(), true);
				in = new BufferedReader(new InputStreamReader(kkSocket.getInputStream()));
			
			
				FileReader fr = new FileReader("/xmlService/bin/xml/Test.xml");
		    
				int c;
				while ((c=fr.read()) != -1) {
					out.write(c);
				}
		       
				fr.close();
				out.close();
				in.close();
				kkSocket.close();
			}
			catch (IOException e) {
				e.printStackTrace();
		    }
		}
}
